#ifndef  __MESSAGE_MANAGER_H__
#define  __MESSAGE_MANAGER_H__
#include "Queue.h"

#define MSG_HEAD 0
typedef struct message
{
    int type;
    int id;
    void (*handler)(void);
    qQueue* queue;
}message_t;

typedef struct msg_node {
    int msg_type;
    int count;
    message_t* msg;
    struct msg_node* priv;
    struct msg_node* next;
}msg_node_t;

void msg_manager__create(void);
int msg_register(int type, message_t *msg);
int msg_manager_enque(int type,void *data);
int msg_manager_deque(int type, void* data);
msg_node_t* msg_get_head();
#endif // ! MESSAGE_MANAGER_H
